package com.kfm.base.io.o;

import com.google.gson.Gson;

public class Demo10 {

    public static void main(String[] args) {
        Student student = new Student("秦爽", 80.8, "男");

        Gson gson = new Gson();
        String json = gson.toJson(student);

        System.out.println(json);

        Student student1 = gson.fromJson(json, Student.class);
        System.out.println(student1);
    }
}
